import Vue from 'vue'
import Router from 'vue-router'
// 下面是新的 element-ui 的
import Main from '@/views/Main'
import Login from '@/views/Login'
import AllImg from '@/views/user/AllImg'
import AlarmImg from '@/views/user/AlarmImg'
import Tongji from '@/views/user/Tongji'

import CarGarage from '@/views/car/Garage'
import CarInformation from '@/views/car/CarInformation'
import CarAllImg from '@/views/car/AllImg'
import CarCount from '@/views/car/Tongji'

import yanjingAllImg from '@/views/yanjing/AllImg'
import yanjingAlarmImg from '@/views/yanjing/AlarmImg'
import yanjingTongji from '@/views/yanjing/Tongji'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/main',
      component: Main,
      children:[
        {path: '/user/allImg', component: AllImg},
        {path: '/user/alarmImg', component: AlarmImg},
        {path: '/user/tongji', component: Tongji},
        {path: '/car/car1', component: CarGarage},
        {path: '/car/car2', component: CarInformation},
        {path: '/car/car3', component: CarAllImg},
        {path: '/car/car4', component: CarCount},
        {path: '/yanjing/allImg', component: yanjingAllImg},
        {path: '/yanjing/alarmImg', component: yanjingAlarmImg},
        {path: '/yanjing/tongji', component: yanjingTongji}
      ]
    },
    {
      path: '/',
      component: Login
    },
  ]
})
